//
//  YCAlertView2ViewController.m
//  DemoAlertView
//
//  Created by tangkexiong on 16/3/8.
//  Copyright © 2016年 tangkexiong. All rights reserved.
//

#import "YCAlertView2ViewController.h"

#import "YCAlertView2.h"

@interface YCAlertView2ViewController () {
    YCAlertView2 *_alert2;
}

@end

@implementation YCAlertView2ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    UIButton *btn2 = [[UIButton alloc] initWithFrame:CGRectMake(8, 72, 100, 44)];
    [btn2 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
    [btn2 setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
    [btn2 setTitle:@"来自xib" forState:UIControlStateNormal];
    [btn2 addTarget:self action:@selector(btn2Clicked:) forControlEvents:UIControlEventTouchUpInside];
    [self.view addSubview:btn2];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

- (void)btn2Clicked:(id)sender {
    _alert2 = [[[NSBundle mainBundle] loadNibNamed:@"YCAlertView2" owner:self options:nil] lastObject];
    [_alert2 show];
}

@end
